/*
* @Author: admin
* @Date:   2018-07-05 10:03:36
* @Last Modified by:   admin
* @Last Modified time: 2018-07-05 10:20:25
*/

// var EventEmitter = require('events').EventEmitter;
// var event = new EventEmitter();
// even.on('some_event',function(){
// 	console.log('some_event事件触发');
// });

// setTimeout(function(){
// 	event.emit('some_event');
// },1000);

var events = require('events');
var EventEmitter = new events.EventEmitter();

EventEmitter.on('some_even',function(){
	console.log('some_event触发');
});

setTimeout(function(){
	EventEmitter.emit('some_even');
},1000);